package slingge.cooleuropeweather;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class Welcome extends AppCompatActivity {

    private Animation anim;
    private ImageView imageview1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        anim= AnimationUtils.loadAnimation(this, R.anim.flash);
        imageview1 = (ImageView)findViewById(R.id.welcome);
        imageview1.startAnimation(anim);
        anim.setAnimationListener(new FlashJianTingQi());
    }
    private class FlashJianTingQi implements Animation.AnimationListener
    {
        @Override
        public void onAnimationEnd(Animation arg0) {
            Intent intent = new Intent(Welcome.this,Map.class);
            startActivity(intent);
            finish();
        }
        @Override
        public void onAnimationRepeat(Animation arg0) {
        }
        @Override
        public void onAnimationStart(Animation arg0) {
        }
    }
}
